//package com.wwg.util;
//
//import cn.hutool.core.util.ObjectUtil;
//import com.xx.common.base.enums.RespCodeEnum;
//import com.xx.common.base.exception.BusinessException;
//import com.xx.common.base.model.vo.Result;
//import org.slf4j.Logger;
//
//import java.util.List;
//
///**
// * @author wuweigang
// */
//public class ErrorResultUtil {
//
//    public static <T> Result<T> generateErrorResult(RespCodeEnum xxxEnum, String issue, Logger log) {
//        String errorMsg = String.format(xxxEnum.getMsg(), issue);
//        log.error(errorMsg,new BusinessException(errorMsg));
//        return Result.error(xxxEnum.getCode(), errorMsg);
//    }
//
//
//    public static <T> Result<T> generateEmptyResult(RespCodeEnum xxxEnum, String issue, Logger log,List<? extends Object> obj) {
//        Result result;
//        if (ObjectUtil.isNotEmpty(obj)) {
//            result =  Result.success(null);
//        }else{
//            result = generateErrorResult(xxxEnum, issue,log);
//        }
//        return result;
//    }
//}
